package org.jeecg.modules.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.entity.ProjectProfessorInfo;
import org.jeecg.modules.mapper.DiyProfessorInfoMapper;
import org.jeecg.modules.mapper.ProjectOwnProfessorMapper;
import org.jeecg.modules.service.ProjectOwnProfessorService;
import org.jeecg.modules.vo.Professor;
import org.jeecg.modules.vo.ProjectOwnProfessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author : ShiJianlong
 * @date : 2020/7/9 13:00
 */
@Service
public class ProjectOwnProfessorServiceImpl extends ServiceImpl<ProjectOwnProfessorMapper, ProjectOwnProfessor> implements ProjectOwnProfessorService {
    @Autowired
    ProjectOwnProfessorMapper projectOwnProfessorMapper;
    @Autowired
    DiyProfessorInfoMapper diyProfessorInfoMapper;
    public Page<ProjectOwnProfessor> queryByProjectId(String projectId) {
        List<ProjectOwnProfessor> projectOwnProfessorMappers = projectOwnProfessorMapper.queryByProjectId(projectId);
        System.out.println();
        for (ProjectOwnProfessor projectOwnProfessor:projectOwnProfessorMappers
        ) {

            if(ProjectProfessorInfo.projectStage.RUNNING==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.抽取中);
            }else if(ProjectProfessorInfo.projectStage.FINISH==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.已完成);
            }else if (ProjectProfessorInfo.projectStage.WARN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.专家库人数不足);
            } else if (ProjectProfessorInfo.projectStage.BEGIN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.未抽取);
            }else if (ProjectProfessorInfo.projectStage.WAIT==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.待确认);
            }else if (ProjectProfessorInfo.projectStage.OVER==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.已结束);
            }
            for (Professor professor: projectOwnProfessor.getProject().getProfessorList()
            ) {
                if(("1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("同意");
                }else if(("2").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("待审核");
                }else if(("0").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("拒绝");
                }else if(("-1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("等待管理员确认");
                }else if(("-3").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("管理员删除");
                }else if(("-4").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("临时有事请假");
                }
                //查询在项目中的职位
                String name = diyProfessorInfoMapper.selDictNameById(professor.getProfessorInProjectProfessorType());
                professor.setProfessorInProjectProfessorType(name);
            }
        }
        Page<ProjectOwnProfessor> page = new Page<>();
        page.setSize(10);
        page.setTotal(1);
        return page.setRecords(projectOwnProfessorMappers);
    }
    @Override
    public Page<ProjectOwnProfessor> queryPage(Page<ProjectOwnProfessor> page) {
        List<ProjectOwnProfessor> projectOwnProfessorMappers = projectOwnProfessorMapper.queryPage();
        for (ProjectOwnProfessor projectOwnProfessor:projectOwnProfessorMappers
        ) {

            if(ProjectProfessorInfo.projectStage.RUNNING==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.抽取中);
            }else if(ProjectProfessorInfo.projectStage.FINISH==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.已完成);
            }else if (ProjectProfessorInfo.projectStage.WARN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.专家库人数不足);
            } else if (ProjectProfessorInfo.projectStage.BEGIN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.未抽取);
            }else if (ProjectProfessorInfo.projectStage.WAIT==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.待确认);
            }
            for (Professor professor: projectOwnProfessor.getProject().getProfessorList()
            ) {
                if(("1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("同意");
                }else if(("2").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("待审核");
                }else if(("0").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("拒绝");
                }else if(("-1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("等待管理员确认");
                }else if(("-3").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("管理员删除");
                }else if(("-4").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("临时有事请假");
                }
                //查询在项目中的职位
                String name = diyProfessorInfoMapper.selDictNameById(professor.getProfessorInProjectProfessorType());
                professor.setProfessorInProjectProfessorType(name);
            }
        }
        //手动更改分页

        return page.setRecords(projectOwnProfessorMappers);
    }
//    @Override
//    public Page<Project> queryPage(Page<Project> page) {
//        List<Project> projectOwnProfessorMappers = projectOwnProfessorMapper.queryPage(page);
//
//        return page.setRecords(projectOwnProfessorMappers);
//    }
    public Page<ProjectOwnProfessor> queryPage01(Page<ProjectOwnProfessor> page,String status) {
        List<ProjectOwnProfessor> projectOwnProfessorMappers = projectOwnProfessorMapper.queryPage01(page,status);
        for (ProjectOwnProfessor projectOwnProfessor:projectOwnProfessorMappers
        ) {

            if(ProjectProfessorInfo.projectStage.RUNNING==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.抽取中);
            }else if(ProjectProfessorInfo.projectStage.FINISH==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.已完成);
            }else if (ProjectProfessorInfo.projectStage.WARN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.专家库人数不足);
            }else if (ProjectProfessorInfo.projectStage.BEGIN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.未抽取);
            }else if (ProjectProfessorInfo.projectStage.WAIT==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.待确认);
            }
            for (Professor professor: projectOwnProfessor.getProject().getProfessorList()
            ) {
                if(("1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("同意");
                }else if(("2").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("待审核");
                }else if(("0").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("拒绝");
                }else if(("-1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("等待管理员确认");
                }else if(("-3").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("管理员删除");
                }else if(("-4").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("临时有事请假");
                }
                //查询在项目中的职位
                String name = diyProfessorInfoMapper.selDictNameById(professor.getProfessorInProjectProfessorType());
                professor.setProfessorInProjectProfessorType(name);
            }
        }
        System.out.println();
        return page.setRecords(projectOwnProfessorMappers);
    }
    public Page<ProjectOwnProfessor> queryPage02(Page<ProjectOwnProfessor> page,String status,String projectName01,String projectType01) {
        List<ProjectOwnProfessor> projectOwnProfessorMappers = projectOwnProfessorMapper.queryPage02(page,status,projectName01,projectType01);
        for (ProjectOwnProfessor projectOwnProfessor:projectOwnProfessorMappers
        ) {

            if(ProjectProfessorInfo.projectStage.RUNNING==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.抽取中);
            }else if(ProjectProfessorInfo.projectStage.FINISH==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.已完成);
            }else if (ProjectProfessorInfo.projectStage.WARN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.专家库人数不足);
            }else if (ProjectProfessorInfo.projectStage.BEGIN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.未抽取);
            }else if (ProjectProfessorInfo.projectStage.WAIT==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.待确认);
            }
            for (Professor professor: projectOwnProfessor.getProject().getProfessorList()
            ) {
                if(("1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("同意");
                }else if(("2").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("待审核");
                }else if(("0").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("拒绝");
                }else if(("-1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("等待管理员确认");
                }else if(("-3").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("管理员删除");
                }else if(("-4").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("临时有事请假");
                }
                //查询在项目中的职位
                String name = diyProfessorInfoMapper.selDictNameById(professor.getProfessorInProjectProfessorType());
                professor.setProfessorInProjectProfessorType(name);
            }
        }
        System.out.println();
        return page.setRecords(projectOwnProfessorMappers);
    }
    public Page<ProjectOwnProfessor> queryPage03(Page<ProjectOwnProfessor> page,String projectName01) {
        List<ProjectOwnProfessor> projectOwnProfessorMappers = projectOwnProfessorMapper.queryPage03(page,projectName01);
        for (ProjectOwnProfessor projectOwnProfessor:projectOwnProfessorMappers
        ) {

            if(ProjectProfessorInfo.projectStage.RUNNING==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.抽取中);
            }else if(ProjectProfessorInfo.projectStage.FINISH==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.已完成);
            }else if (ProjectProfessorInfo.projectStage.WARN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.专家库人数不足);
            }else if (ProjectProfessorInfo.projectStage.BEGIN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.未抽取);
            }else if (ProjectProfessorInfo.projectStage.WAIT==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.待确认);
            }
            for (Professor professor: projectOwnProfessor.getProject().getProfessorList()
            ) {
                if(("1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("同意");
                }else if(("2").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("待审核");
                }else if(("0").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("拒绝");
                }else if(("-1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("等待管理员确认");
                }else if(("-3").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("管理员删除");
                }else if(("-4").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("临时有事请假");
                }
                //查询在项目中的职位
                String name = diyProfessorInfoMapper.selDictNameById(professor.getProfessorInProjectProfessorType());
                professor.setProfessorInProjectProfessorType(name);
            }
        }
        System.out.println();
        return page.setRecords(projectOwnProfessorMappers);
    }
    public Page<ProjectOwnProfessor> queryPage04(Page<ProjectOwnProfessor> page,String projectType01) {
        List<ProjectOwnProfessor> projectOwnProfessorMappers = projectOwnProfessorMapper.queryPage04(page,projectType01);
        for (ProjectOwnProfessor projectOwnProfessor:projectOwnProfessorMappers
        ) {

            if(ProjectProfessorInfo.projectStage.RUNNING==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.抽取中);
            }else if(ProjectProfessorInfo.projectStage.FINISH==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.已完成);
            }else if (ProjectProfessorInfo.projectStage.WARN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.专家库人数不足);
            }else if (ProjectProfessorInfo.projectStage.BEGIN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.未抽取);
            }else if (ProjectProfessorInfo.projectStage.WAIT==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.待确认);
            }
            for (Professor professor: projectOwnProfessor.getProject().getProfessorList()
            ) {
                if(("1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("同意");
                }else if(("2").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("待审核");
                }else if(("0").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("拒绝");
                }else if(("-1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("等待管理员确认");
                }else if(("-3").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("管理员删除");
                }else if(("-4").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("临时有事请假");
                }
                //查询在项目中的职位
                String name = diyProfessorInfoMapper.selDictNameById(professor.getProfessorInProjectProfessorType());
                professor.setProfessorInProjectProfessorType(name);
            }
        }
        System.out.println();
        return page.setRecords(projectOwnProfessorMappers);
    }
    public Page<ProjectOwnProfessor> queryPage05(Page<ProjectOwnProfessor> page,String status,String projectName01) {
        List<ProjectOwnProfessor> projectOwnProfessorMappers = projectOwnProfessorMapper.queryPage05(page,status,projectName01);
        for (ProjectOwnProfessor projectOwnProfessor:projectOwnProfessorMappers
        ) {

            if(ProjectProfessorInfo.projectStage.RUNNING==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.抽取中);
            }else if(ProjectProfessorInfo.projectStage.FINISH==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.已完成);
            }else if (ProjectProfessorInfo.projectStage.WARN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.专家库人数不足);
            }else if (ProjectProfessorInfo.projectStage.BEGIN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.未抽取);
            }else if (ProjectProfessorInfo.projectStage.WAIT==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.待确认);
            }
            for (Professor professor: projectOwnProfessor.getProject().getProfessorList()
            ) {
                if(("1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("同意");
                }else if(("2").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("待审核");
                }else if(("0").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("拒绝");
                }else if(("-1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("等待管理员确认");
                }else if(("-3").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("管理员删除");
                }else if(("-4").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("临时有事请假");
                }
                //查询在项目中的职位
                String name = diyProfessorInfoMapper.selDictNameById(professor.getProfessorInProjectProfessorType());
                professor.setProfessorInProjectProfessorType(name);
            }
        }
        System.out.println();
        return page.setRecords(projectOwnProfessorMappers);
    }
    public Page<ProjectOwnProfessor> queryPage06(Page<ProjectOwnProfessor> page,String status,String projectType01) {
        List<ProjectOwnProfessor> projectOwnProfessorMappers = projectOwnProfessorMapper.queryPage06(page,status,projectType01);
        for (ProjectOwnProfessor projectOwnProfessor:projectOwnProfessorMappers
        ) {

            if(ProjectProfessorInfo.projectStage.RUNNING==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.抽取中);
            }else if(ProjectProfessorInfo.projectStage.FINISH==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.已完成);
            }else if (ProjectProfessorInfo.projectStage.WARN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.专家库人数不足);
            }else if (ProjectProfessorInfo.projectStage.BEGIN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.未抽取);
            }else if (ProjectProfessorInfo.projectStage.WAIT==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.待确认);
            }
            for (Professor professor: projectOwnProfessor.getProject().getProfessorList()
            ) {
                if(("1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("同意");
                }else if(("2").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("待审核");
                }else if(("0").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("拒绝");
                }else if(("-1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("等待管理员确认");
                }else if(("-3").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("管理员删除");
                }else if(("-4").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("临时有事请假");
                }
                //查询在项目中的职位
                String name = diyProfessorInfoMapper.selDictNameById(professor.getProfessorInProjectProfessorType());
                professor.setProfessorInProjectProfessorType(name);
            }
        }
        System.out.println();
        return page.setRecords(projectOwnProfessorMappers);
    }
    public Page<ProjectOwnProfessor> queryPage07(Page<ProjectOwnProfessor> page,String projectName01,String projectType01) {
        List<ProjectOwnProfessor> projectOwnProfessorMappers = projectOwnProfessorMapper.queryPage07(page,projectName01,projectType01);
        for (ProjectOwnProfessor projectOwnProfessor:projectOwnProfessorMappers
        ) {

            if(ProjectProfessorInfo.projectStage.RUNNING==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.抽取中);
            }else if(ProjectProfessorInfo.projectStage.FINISH==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.已完成);
            }else if (ProjectProfessorInfo.projectStage.WARN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.专家库人数不足);
            }else if (ProjectProfessorInfo.projectStage.BEGIN==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.未抽取);
            }else if (ProjectProfessorInfo.projectStage.WAIT==(projectOwnProfessor.getProject().getProjectStatus())){
                projectOwnProfessor.getProject().setProjectStatus(ProjectProfessorInfo.projectStage.待确认);
            }
            for (Professor professor: projectOwnProfessor.getProject().getProfessorList()
            ) {
                if(("1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("同意");
                }else if(("2").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("待审核");
                }else if(("0").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("拒绝");
                }else if(("-1").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("等待管理员确认");
                }else if(("-3").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("管理员删除");
                }else if(("-4").equals(professor.getProfessorInProjectStates())){
                    professor.setProfessorInProjectStates("临时有事请假");
                }
                //查询在项目中的职位
                String name = diyProfessorInfoMapper.selDictNameById(professor.getProfessorInProjectProfessorType());
                professor.setProfessorInProjectProfessorType(name);
            }
        }
        System.out.println();
        return page.setRecords(projectOwnProfessorMappers);
    }

}
